home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / TECHNICA / AUTOCAD / H107.ZIP / HAT20.ZIP / HAT20.DOC next >
Text File  |  1991-05-31  |  26KB  |  589 lines

  1.  
  2.  
  3.          HAT hatch utilities version 2.0  (c)1991 Michael E. Ross
  4.          All Rights Reserved.
  5.  
  6.          This program is distributed as Shareware.  You are allowed
  7.          to try the HAT hatch utilities FREE, but if you decide to
  8.          keep the utilities, you MUST register.  See the registration
  9.          form HATORDER.DOC included with the HAT programs.  Your
  10.          evaluation period must not exceed 2 weeks.
  11.  
  12.  |       The trial copy of HAT has been embedded with registration
  13.  |       reminder notices.  When you register your copy, you will be
  14.  |       sent a new copy of HAT 2.0 with no such reminder notices.
  15.  
  16.          THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
  17.          WARRANTY. ALL IMPLIED WARRANTIES ARE HEREBY DISCLAIMED.
  18.  
  19.          HAT is a group of programs designed to make using the hatch
  20.          utility of AutoCAD easier.
  21.  
  22.          Feel free to distribute HAT, as long as you include:
  23.  
  24.             HAT20.DOC     this file
  25.             HAT20.LSP     the program
  26.             HAT20.MNU     icon menu accessed by HAT20.LSP
  27.             HAT20.DWG     sample drawing to try HAT (try it!)
  28.             HATORDER.DOC  order form
  29.  
  30.  |       If you simply pass along the compressed HAT20 file all these
  31.  |       files will be included.  The Compression format will depend
  32.  |       on where you obtained the HAT20 file.  Some electronic
  33.  |       bulletin boards may distribute only ZIP files which must be
  34.  |       decompressed with PkunZIP.  If the HAT20 file you have has
  35.  |       an .EXE extension, then this is a self extracting compressed
  36.  |       file and you need only type the word HAT20 for decompression
  37.  |       to begin.
  38.  
  39.          Even if you decide not to register, please fill out the
  40.          comments portion of the registration form to let me know what
  41.          you thought and any suggestions you may have.
  42.  
  43.          Finally, please don't abuse the Shareware system, it has been
  44.          a real boon to thousands of computer users, and has provided
  45.          fantastic macros and programming. It provides you with the
  46.          opportunity to try software out BEFORE you buy it.
  47.  
  48.          To register your copy of HAT 2.0, simply print out and
  49.          complete the accompanying order form, HATORDER.DOC. Send the
  50.          completed form with your payment to the address shown on the
  51.          order form, or listed at the end of this document.
  52.  
  53.          The order price for HAT 2.0 is $20.00 (U.S.).
  54.          If you wish to upgrade from HAT 1.4, There is no fee, just
  55.          send in the order form as your registration.  Upgrading from
  56.          HAT 1.3 and earlier versions is $6.00.
  57.  
  58.  
  59.  
  60.                                                                           Page 2
  61.  
  62.  
  63.  
  64.                                     HAT 2.0
  65.                               Instruction Manual
  66.  
  67.                                    21 May 91
  68.  
  69.                             (c)1991 Michael E. Ross
  70.                               All Rights Reserved
  71.  
  72.  
  73.          Table of Contents:                                     Page
  74.  
  75.             Introduction, What is HAT 2.0 ........................3
  76.  
  77.             What HAT does.........................................3
  78.  
  79.             Installing HAT 2.0 ...................................4
  80.  
  81.             How to use HAT........................................6
  82.  
  83.             Tips on using HAT.....................................9
  84.  
  85.             Enhancements to HAT...................................11
  86.  
  87.             Technical info........................................13
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.          Changes and additions to this manual are denoted by a
  96.          vertical line in the left margin.
  97.  
  98.          AutoCAD & AutoLISP are registered trademarks of AutoDesk Inc
  99.  
  100.  
  101.  
  102.                                                                           Page 3
  103.          ----------------------What is HAT 2.0------------------------
  104.  
  105.  |       HAT20.LSP is an AutoLISP program which enhances AutoCAD
  106.  |       R.10 and R.11 hatch command.
  107.  
  108.  |       Have you ever tried to find out what pattern name, scale or
  109.  |       angle was used to create an existing hatch pattern?  Did you
  110.  |       try the List command and select the hatch pattern only to no
  111.  |       avail?
  112.  
  113.          Or have you ever created a hatched area only to decide you
  114.          don't like the scale or rotation angle, or you wish you
  115.          could just move the pattern slightly? If so, you most likely
  116.          erased the pattern and rehatched the area, possibly repeating
  117.          the process several times until you were satisfied.
  118.  
  119.          If you have wished for an easy solution to these problems,
  120.          then HAT is for you!
  121.  
  122.  
  123.          ----------------------WHAT HAT.LSP DOES----------------------
  124.  
  125.          HAT works much like the AutoCAD hatch command, but also
  126.          allows you to dynamically RESCALE and ROTATE, and MOVE hatch
  127.          patterns as you create them.
  128.  
  129.          In addition, HAT records hatch information about each hatch
  130.          pattern it creates. This information is stored with the
  131.          drawing and may be REFERENCED at any time.
  132.  
  133.          If you want to hatch an area with the same pattern, scale and
  134.          angle as an existing pattern, there is also a SELECT option
  135.          to MATCH existing patterns.
  136.  
  137.          HAT can only extract reference information from hatch
  138.          patterns which were created with the HAT command.
  139.  
  140.          HAT improves on the AutoCAD hatch command by giving full
  141.          control of hatch patterns. HAT does everything the hatch
  142.          command does and more!
  143.  
  144.          HAT even knows if a pattern has been rescaled or rotated
  145.          after its original creation.  When you query HAT about such
  146.          a hatch pattern, HAT will report the actual scale and
  147.          rotation.
  148.  
  149.  
  150.  
  151.                                                                           Page 4
  152.          ---------------------INSTALLING HAT 2.0----------------------
  153.  
  154.  |       HAT 2.0 is for use with AutoCAD R.10 and R.11 dos versions.
  155.  
  156.          Installing HAT is easy.
  157.  
  158.  |       If you just have one file called HAT20.EXE or HAT20.ZIP or
  159.  |       some such name, the first step is decompressing the HAT
  160.  |       files.
  161.  
  162.  |       If you are reading this, you obviously have successfully
  163.  |       decompressed the HAT20 compressed file, however the
  164.  |       following is provided for the sake of general information.
  165.  
  166.  |         In the case of HAT20.EXE, this is a self extracting
  167.  |         compressed file.  All you need to do is log onto the drive
  168.  |         which contains HAT20.EXE, and type HAT20 and enter.  The
  169.  |         HAT files will be automatically decompressed to the drive
  170.  |         where HAT20 is located.
  171.  
  172.  |         If your file is called HAT20.ZIP you will need to
  173.  |         decompress with PkunZIP program (available as Shareware
  174.  |         on most electronic bulletin boards).
  175.  
  176.  |         The compression format for the HAT20 compressed file will
  177.  |         depend on where you obtained the HAT20 file from.  If your
  178.  |         source was Compuserve, the format will be EXE or self
  179.  |         extracting.  Some electronic bulletin boards use their own
  180.  |         standard compression format such as ZIP or PAK.
  181.  
  182.  
  183.  |       Decompressing the HAT20 compressed file will generate the
  184.  |       following 5 HAT files:
  185.  |          HAT20.DOC     this file
  186.  |          HAT20.LSP     the program
  187.  |          HAT20.MNU     icon menu accessed by hat.lsp
  188.  |          HAT20.DWG     sample drawing to try HAT (try it!)
  189.  |          HATORDER.DOC  order form
  190.  
  191.  |       Now you simply copy the above files to the directory you use
  192.  |       for AutoCAD.  See example below.
  193.  
  194.          If you use a special directory for lisp programs you may
  195.          put HAT20.LSP there, but the file HAT20.MNU must be in the
  196.          AutoCAD library path (either the directory where ACAD.EXE
  197.          is or a directory specified by the ACAD environment
  198.          variable. [I.E. SET ACAD=path;anotherpath;yetanotherpath]
  199.          see AutoCAD Reference Manual R.11, page 480).
  200.  
  201.  
  202.  
  203.                                                                           Page 5
  204.  
  205.          example:
  206.            Your acad.exe file is on the D: drive, \acad subdirectory.
  207.            The HAT files are on a floppy diskette in drive A:.
  208.  
  209.            simply type:
  210.            copy a:*.* d:\acad
  211.            and hit return
  212.  
  213.            Now when you are in AutoCAD drawing editor, you can type:
  214.            (load"hat20")
  215.            and hit return. You must type the parenthesis and quotes
  216.            exactly as shown. When you have done this you will see the
  217.            message:
  218.            Loaded HAT 2.0 programs. (c)1991 Michael E. Ross.
  219.            You may now type:
  220.            hat
  221.            and hit return. The HAT program will take it from there!
  222.  
  223.  
  224.  
  225.                                                                           Page 6
  226.          ------------------------HOW TO USE HAT-----------------------
  227.  
  228.          For a "Quick Intro" to HAT, load the sample drawing,
  229.          HAT20.DWG, on your machine and follow the suggestions shown.
  230.  
  231.          Load the HAT programs by typing (load"hat20") from the
  232.          AutoCAD drawing editor, (the hat files must be in the ACAD
  233.          search path such as the directory where ACAD.EXE is). For
  234.          more information on the load command, see page 113 of the
  235.          AutoLISP Programmers Reference Release 11.
  236.          (see "Installing HAT 2.0" above)
  237.  
  238.          Type the word hat from the Command: prompt. That's all
  239.          there is to it. Follow the prompts as you would the regular
  240.          hatch command:
  241.  
  242.            1. Pattern name / [S]elect / [U]ser / ? / <default>:
  243.               a. you can type the name of the pattern you want to use.
  244.               b. type S and you may Select an existing hatch to match
  245.                  it (as long as it was created with HAT.LSP).
  246.               c. type U and create a user defined hatch just like the
  247.                  user option of the standard hatch command.
  248.               d. type a ? and you can use the icon menus to select
  249.                  your pattern.  (see the section of this document
  250.                  titled "INSTALLING HAT 2.0")
  251.               e. hit return to accept the default pattern.
  252.  
  253.               Any of the N,O, or I modifiers may be added to the
  254.               pattern name. (see page 400 R.11 reference manual)
  255.  
  256.               Any "legal" pattern name may be specified whether
  257.               it is part of ACAD.PAT or a custom pattern name.
  258.               (see page 402 R.11 reference manual)
  259.  
  260.            2. Scale for pattern <default>:
  261.  
  262.               a. type in a scale (or pick 2 points on screen)
  263.               b. hit return to accept the default
  264.  
  265.            3. Angle for pattern <default>:
  266.  
  267.               a. type in an angle (or you can pick an angle on screen)
  268.               b. hit return to accept the default
  269.  
  270.            4. Select objects
  271.  
  272.               pick the border(s) for your hatch pattern using any of
  273.               the standard Select options.
  274.  
  275.               HAT.LSP hatches the selected area and prompts you for
  276.               rescaling and rotating options:
  277.  
  278.  
  279.  
  280.                                                                           Page 7
  281.  
  282.            5. Do you want to REscale / ROtate / Move? <No>:
  283.  
  284.               a. type the first letter(s) of the option you want.
  285.                  Hat will reprompt you for new value required, then
  286.                  rehatch the area automatically, and return to this
  287.                  prompt. You can keep adjusting the pattern until you
  288.                  are satisfied.
  289.  
  290.               b. hit return to accept the scale angle and position.
  291.  
  292.  |        The next prompt only applies to AutoCAD R.10 users, if your
  293.  |        system is AutoCAD R.11 or above, HAT 2.0 uses a different,
  294.  |        more efficient technique to attach reference information,
  295.  |        namely extended entity data.  This only adds about 100 bytes
  296.  |        to your drawing, so HAT does not bother to ask whether you
  297.  |        want it attached, it just does it.
  298.  
  299.           6. Do you want to make a Hatch Reference Block? <Yes>:
  300.  
  301.               a. hit return to store the info about the hatch you just
  302.                  made. An invisible reference block will be inserted
  303.                  into the drawing. The reference block takes about 400
  304.                  bytes.
  305.  
  306.               b. if for some reason, you don't want the reference
  307.                  block to be inserted, type n. If you do this, you
  308.                  won't be able to get the pattern info (name, scale,
  309.                  and angle) at a later time, it will be just like a
  310.                  hatch created with the 'hatch' command.
  311.  
  312.          That's it! Not only does HAT.LSP make creating hatch patterns
  313.          easier but it enables you to find out what pattern, scale and
  314.          angle was used at any time in the drawings life.
  315.  
  316.          After having created a hatch pattern using HAT, you may now
  317.          reference that pattern at any time to find the pattern's
  318.          scale and rotation angle. To do this, HAT.LSP must be loaded
  319.          as above, then:
  320.  
  321.          HATREF
  322.            Type 'hatref' from the command prompt. You will be prompted
  323.            to select a hatch pattern. When you do, the pattern name,
  324.            it's scale and angle will be printed to the screen.
  325.  
  326.            If you try this on a pattern with no reference block, such
  327.            as a hatch pattern created with the standard hatch command,
  328.            you will be so informed.
  329.  
  330.  
  331.  
  332.                                                                           Page 8
  333.  
  334.          HATCLR
  335.            Function to erase stray HAT attributes left by exploding a
  336.  |         hatch pattern created with HAT 1.5 or earlier.  These
  337.            attributes are for the most part harmless, but may plot as
  338.            a dot in your drawing and will cause attribute prompting if
  339.            the drawing they are in is inserted as a block. HATCLR
  340.            finds them, and gets rid of them. To use HATCLR simply load
  341.            HAT as described above, and type 'hatclr' at the command
  342.            prompt.
  343.  
  344.  |         HAT 2.0 does not use attributes to store hatch information,
  345.  |         it uses extended entity data.  This approach, only possible
  346.  |         with new lisp commands in R.11 is faster, cleaner, uses
  347.  |         less memory and leaves no stray attributes if you should
  348.  |         explode the hatch pattern.
  349.  
  350.  
  351.  
  352.                                                                           Page 9
  353.          -------------------TIPS ON USING HAT 2.0---------------------
  354.  
  355.          Hat may be employed to manipulate hatch patterns in some very
  356.          useful ways. Here are a few examples:
  357.  
  358.            EXAMPLE 1:
  359.            When a normal hatch pattern is included in a stretch
  360.            operation, it usually stays put, right where it was. (We
  361.            know that hatch patterns themselves cannot be stretched,
  362.            right? but often they and their surrounding objects need to
  363.            be stretched). In the above example, then, the hatch itself
  364.            stayed put because hatch patterns are blocks and their
  365.            insert point is the SNAPBASE point, usually 0,0. So unless
  366.            the crossing window selected for the stretch operation
  367.            included the point 0,0, the hatch does not move with the
  368.            rest of the objects.
  369.  
  370.            Here is where HAT comes to the rescue! Using the HAT
  371.            program allows you to "move" the hatch pattern as you
  372.            create it. This actually moves the SNAPBASE point to a
  373.            new location and rehatches. This allows you to use the
  374.            Move option to move the insert point of the hatch pattern
  375.            to some point within the hatch, and subsequent stretch
  376.            commands will be much more likely to really move the
  377.            hatch pattern with its surrounding entities.
  378.  
  379.            To accomplish this, when HAT displays:
  380.            Do you want to REscale / ROtate / Move? <No>:
  381.            respond with "M", then for the basepoint of the move, use:
  382.            "osnap insert", and select the hatch pattern. This will
  383.            get the original insert point of the hatch pattern. For
  384.            the second point of the move, pick a point somewhere
  385.            within the hatch. Complete the HAT operation by Rescaling,
  386.            Rotating etc. That's it! You can check the insert point
  387.            of the new hatch pattern (draw a temporary line from the
  388.            "osnap insert" of the new hatch, there's it's insert
  389.            point). The next time you try to stretch it and it's
  390.            surrounding entities, as long as your crossing window
  391.            contains this insert point, the hatch will move with the
  392.            other entities.
  393.  
  394.            A side note, don't worry about changing the SNAPBASE
  395.            point, HAT resets it to its former location.
  396.  
  397.  
  398.  
  399.                                                                          Page 10
  400.  
  401.            EXAMPLE 2:
  402.            The Move option of HAT also allows you to align a new hatch
  403.            pattern created adjacent to an existing hatched area.
  404.  
  405.            If you wish to hatch an area next to an existing hatched
  406.            area, possibly to expand the hatched area without redoing
  407.            the whole thing, first use the Select option described
  408.            above to "match" the pattern, scale and angle. If the old
  409.            hatch pattern has been moved, rotated or relocated in any
  410.            way, the new pattern will have a different insert point
  411.            and the patterns will not align.
  412.  
  413.            To align the new pattern to the old one, simply use the
  414.            Move option during the HAT operation; type "M" for move,
  415.            then for the base point or displacement, use "osnap
  416.            insert" and select a point on the NEW hatch pattern, for
  417.            the second point of the move, use "osnap insert" and
  418.            select a point on the OLD hatch pattern. This will change
  419.            the insert point of the new hatch pattern to match that
  420.            of the old one, thereby aligning the patterns.
  421.  
  422.            This procedure only works with hatch patterns created with
  423.            HAT.  Normally AutoCAD R.11 sets the insert point of a
  424.            hatch pattern to 0,0, regardless of where the SNAPBASE
  425.            point was.  Using HAT allows you to retain the actual
  426.            insert point used to create the pattern.
  427.  
  428.          There are other tricks which HAT enables a creative thinker
  429.          to accomplish. If you have come up with a handy application
  430.          with HAT, I'd like to hear about it, I may even include it
  431.          in this section of future releases of HAT.
  432.  
  433.  
  434.  
  435.                                                                          Page 11
  436.          ------------------ENHANCEMENTS FOR HAT 2.0-------------------
  437.  
  438.  |       HAT 2.0 represents the highest achievement in hatching
  439.  |       technology.
  440.  
  441.  |         Hat recognizes which version of AutoCAD is being used and
  442.  |         responds accordingly, utilizing new features described
  443.  |         below if it finds R.11 or higher.
  444.  
  445.  |         If R.10 is detected, HAT uses attributes to store hatch
  446.  |         data.  This is the same method as HAT versions 1.0 through
  447.  |         1.5.
  448.  
  449.  |         If R.11 is detected, HAT uses extended entity data to store
  450.  |         the hatch data.  This method is only possible due to new
  451.  |         commands in R.11.  Using extended entity data is better
  452.  |         than attributes for the following reasons:
  453.  |          -It is faster to generate.
  454.  |          -It uses less memory.
  455.  |          -It retains the name of the hatch block (an unnamed block)
  456.  |             rather than having to make up a block name.
  457.  |          -Attributes do not become stranded should the hatch block
  458.  |             be exploded.
  459.  
  460.  |         HAT and HATREF will recognize the hatch Regardless of which
  461.  |         type of hatch reference info is attached to the pattern, as
  462.  |         long as the hatch was created with a version of HAT.
  463.  
  464.  
  465.          ------------------ENHANCEMENTS FOR HAT 1.5-------------------
  466.  
  467.          HAT 1.5 represents further enhancements made to the program
  468.          in response to registered and non registered user
  469.          suggestions.
  470.  
  471.            HAT command repeat. If you press enter immediately after
  472.            using HAT, you get the Select objects: prompt, skipping
  473.            the initial HAT prompts. This has been added to more
  474.            closely imitate the standard hatch command.
  475.  
  476.            N, O and I modifiers (normal, outermost and ignore) are
  477.            now allowed (preceded by a comma) for all legal pattern
  478.            names.
  479.  
  480.            All legal pattern names are now supported, whether the
  481.            patterns are in the acad.pat file or are custom pattern
  482.            files located elsewhere.
  483.  
  484.            The first pick for Select objects: prompt may now be a
  485.            window, crossing, previous, last or any other legal
  486.            response to a normal Select objects: prompt.
  487.  
  488.  
  489.  
  490.                                                                          Page 12
  491.          ------------------ENHANCEMENTS FOR HAT 1.4-------------------
  492.  
  493.          HAT 1.4 represents further enhancements made to the program
  494.          in response to registered user suggestions.
  495.  
  496.            A problem with text styles defined with a fixed height is
  497.            fixed.  HAT is not affected by either fixed or variable
  498.            height text.
  499.  
  500.            Reference blocks are now given unique names so that block
  501.            redefinition does not occur if a drawing with HAT reference
  502.            blocks is inserted onto another.
  503.  
  504.            The color of HAT patterns is now changeable as are normal
  505.            hatch patterns.
  506.  
  507.            HAT now reads the ACAD.PAT file with more versatility.  If
  508.            a customized ACAD.PAT file is used, the pattern header does
  509.            not require the pattern description as required by HAT 1.3.
  510.  
  511.  
  512.          ------------------ENHANCEMENTS FOR HAT 1.3-------------------
  513.  
  514.          HAT 1.2 has been improved!  The following is a list of the
  515.          improvements:
  516.  
  517.            User defined hatch patterns are now allowed and fully
  518.            supported by HAT and HATREF.  User defined hatch patterns
  519.            may even be matched with the Select option of HAT 1.3.
  520.  
  521.            The Move option now works more like the AutoCAD Move
  522.            command.  Absolute and relative points may be supplied
  523.            as well as Displacement.
  524.  
  525.            Hatches created with HAT 1.3 may now be changed to
  526.            different layers and the hatch will adopt the
  527.            characteristics of that layer (color linetype etc.).
  528.  
  529.            HAT 1.3 and HATREF will report the actual scale and angle
  530.            of a hatch pattern created with HAT even if it has been
  531.            scaled or rotated using AutoCAD editing commands.
  532.  
  533.  
  534.  
  535.                                                                          Page 13
  536.          ---------------------HAT TECHNICAL INFO----------------------
  537.  
  538.  |       HAT 2.0 is for use with R.10 or R.11 (dos).
  539.  
  540.          HAT searches the ACAD.PAT file to determine if pattern names
  541.          typed in are valid.  Custom hatch patterns, may be specified
  542.          if they are legal pattern definitions and are in a directory
  543.          where AutoCAD will find them.
  544.  
  545.          HAT will bomb if you have set Undo Control to one or none.
  546.  
  547.  |       All versions of HAT prior to version 2.0 and HAT 2.0 running
  548.  |       on R.10 use attributes to store the hatch information.  If
  549.  |       one such hatch pattern is exploded, the attributes will be
  550.  |       stranded or left on your drawing.
  551.  
  552.  |       HAT 2.0 running on R.11 does not use attributes, rather
  553.  |       extended entity data.  This is more memory efficient,
  554.  |       executes faster than creating attributes, and has no side
  555.  |       effects if the hatch pattern is exploded.
  556.  
  557.  |       The stray attributes left from exploding hatch patterns
  558.  |       generated by HAT 2.0 running on R.10 are basically harmless
  559.          but may be noticed as a dot on your plot (they're real
  560.          small).  Also, if you insert the drawing on which the hatch
  561.          was exploded, into another drawing, then you will probably
  562.          get attribute prompts.  To avoid these side effects,
  563.            1. don't explode hatch patterns
  564.            2. or, use HATCLR described above to erase the HAT
  565.               attributes. (Just type 'hatclr' after loading HAT).
  566.  
  567.  
  568.          Only the capitalized letters of the option keywords used in
  569.          HAT should be supplied.  For example, to initiate the Select
  570.          option, an s or S are all that should be supplied.  This is
  571.          necessary since a custom hatch patterns may have names
  572.          similar to the option keywords.  If you make a custom screen
  573.          menu to supply responses to HAT requests, limit the response
  574.          options to only the necessary letters (such as S U RO).
  575.  
  576.          If you find the performance of HAT to be inadequate, please
  577.          let me know by filling out the comments on the ORDER FORM.
  578.          I have found HAT to work best on AutoCAD 386 or Extended
  579.          lisp.
  580.  
  581.  
  582.          Michael E. Ross
  583.          610 E. Canon Perdido, 6
  584.          Santa Barbara, CA 93103-3037
  585.          U.S.A.
  586.  
  587.          Compuserve 73527,726
  588.  
  589.